# include <iostream>
using namespace std;
int main()
{
        int n;
        int suma;
        suma=0;
        cin>>n;
        while(n!=0)
        {
            suma=suma+n;
            cin>>n;
        }
        cout<<suma;
        return 1;
}
